package cn.battlecruiser.vishnu.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

import cn.battlecruiser.vishnu.gateway.filter.AccessFilter;

@SpringBootApplication
@EnableDiscoveryClient
public class VishnuGatewayApplication {

	public static void main(String[] args) {
		SpringApplication.run(VishnuGatewayApplication.class, args);
	}
	
	/**
     * 资源过滤器
     * @return 资源过滤器
     */
    @Bean
    public AccessFilter accessFilter(){
        return new AccessFilter();
    }

}

